<?php
	class About_Model extends CI_Model {
		function __construct()
		{
			parent::__construct();	
		}
		
		function update_img($input)
		{
			if($this->session->userdata('admin_logged_in') == TRUE){
				$data = array(
					'a_path' => $input['img'] ,
				);
				$this->db->where('a_id', 1);
				$this->db->update('about', $data);
				return $this->db->affected_rows();
			}else{
				return 0;
			}
		}
		
		function get_info()
		{
			if($this->session->userdata('admin_logged_in') == TRUE){
				$this->db->from('about');
				$query = $this->db->get();
				return $query->result();
			}
		}
		
		function get_img()
		{
			$this->db->select('a_path ');
			$this->db->where('a_id ', 1);
			$this->db->from('about');
			$query2 = $this->db->get();
			return $query2->row();
		}
	}


/* End of file news_model.php */
/* Location: ./application/models/admin/news_model.php */